<%@page pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link href="${ctx}/style/css.css" rel="stylesheet" type="text/css">
<script src="${ctx}/js/jquery1-11-11.min.js"></script>
<script src="${ctx}/js/common.js"></script>
<style>
.user_text{border:0px;border-bottom:1px solid #ccc;}
.hd_qd_an{background:#0ea4fb;}
.hd_qd_an:hover{background:#0695e9;}
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$('#submit').click(function() {
			var name = $('#name').val();
			var mobile = $('#mobile').val();
			var enterprise = $('#enterprise').val();
			console.log(name);
			console.log(mobile);
			console.log(enterprise);
			$.ajax({
				"url" : "${ctx}/activiter/add", //路径
				"cache" : false, //不缓存
				"async" : true, //异步
				"type" : "POST", //POST方式提交
				"dataType" : "json", //json格式，重要
				// "contentType": "application/json",	  //json格式
				"data" : {
					'activiter.activiter_name' : name,
					'activiter.activiter_mobile' : mobile,
					'activiter.enterprise' : enterprise
				}, //要提交的数据对象
				success : function(json) { //成功处理
					console.log('处理成功!');
					console.log(json);
					if(json.msg != null){
						console.log(json.msg);
						alertsimple(json.msg, 5000);
						return;
					}
					alertsimple('已经成功添加活动人员.', 5000);
				},
				error : function(x, e) { //异常处理
					console.log(x);
					console.log(e);
					console.log('处理失败');
				}
			});
		});
	});
</script>
<!--全诚字符图标-->
<link href="${ctx}/style/font.css" rel="stylesheet" type="text/css">
</head>

<body>
	<!--左边代码-->
	<div class="left_con">
		<div class="hd_bt">
			<strong style="font-size: 16px;" >${activtites.activites_name}</strong>
		</div>

		<div class="hd_con" style="text-align: center;">
			<form method="post" action="${ctx}/activiter/add" id="form1">
				<input id="enterprise" class="user_text i2"
					name="activiter.enterprise" type="text" placeholder="请填写企业名称">
				<input id="name" class="user_text i1"
					name="activiter.activiter_name" type="text" placeholder="请填写姓名"><br>
				<input id="mobile" class="user_text i2"
					name="activiter.activiter_mobile" type="text" placeholder="请填写电话">
				<div style="font-size:20px;margin-bottom:20px;">
					<input type="radio" name="sex" value="1"/>男&nbsp;&nbsp;&nbsp;<input type="radio" name="sex" value="0"/>女
				</div>
			</form>

		</div>

		<div class="hd_con">

			<a href="javascript:void(0)" id="submit"><div class="hd_qd_an"
					style="float: left;margin-left:50px;">添加</div></a> <a href="${ctx}/admin/list/1-${activtites.id}"><div
					class="hd_qd_an" style="float: right;margin-right:50px;">返回</div></a>

			<!--<div style="float:left; width:50%">
      <a href="#"><div class="hd_qd_an">
        按钮功能
      </div></a>
    </div>-->
		</div>

<!--js弹出框功能-->
	<div id="insert" style="position: fixed; z-index: 2000;"></div>
	</div>



</body>
</html>
